using System.Threading.Tasks;

namespace Terra.Core.Infrastructure.Email.Interfaces;

/// <summary>
/// 邮件发送服务接口
/// </summary>
public interface IEmailSender
{
    /// <summary>
    /// 发送邮件
    /// </summary>
    /// <param name="to">收件人邮箱</param>
    /// <param name="subject">邮件主题</param>
    /// <param name="body">邮件内容</param>
    /// <param name="isHtml">是否HTML格式</param>
    /// <returns>发送结果</returns>
    Task<bool> SendAsync(string to, string subject, string body, bool isHtml = false);
}